import { CodeGroup } from '@/components/forMdx'

# Jazz 0.13.0 - React Native Split

Version 0.13.0 introduces a significant architectural change in how Jazz supports React Native applications. We've separated the React Native implementation into two distinct packages to better serve different React Native development approaches:

1. **[jazz-react-native](https://www.npmjs.com/package/jazz-react-native)**: Focused package for framework-less React Native applications
2. **[jazz-expo](https://www.npmjs.com/package/jazz-expo)**: Dedicated package for Expo applications
3. **[jazz-react-native-core](https://www.npmjs.com/package/jazz-react-native-core)**: Shared core functionality used by both implementations

This guide focuses on upgrading **React Native without Expo** applications. If you're using Expo, please see the [Expo upgrade guide](/docs/react-native-expo/upgrade/0-13-0).

## Migration Steps for React Native

1. **Update Dependencies**
<CodeGroup>
```bash
# Ensure you have the required dependencies
npm install @op-engineering/op-sqlite react-native-mmkv @react-native-community/netinfo

# Remove the old packages
npm install jazz-react-native-expo  # [!code --]

# Install the new packages
npm install jazz-react-native jazz-react-native-media-images # [!code ++]

# Run pod install for iOS
npx pod-install
```
</CodeGroup>
2. **No Import Changes Required**
Your existing imports from `jazz-react-native` should continue to work, but the implementation now uses a different storage solution (op-sqlite and MMKV).
## Storage Adapter Changes
The `jazz-react-native` package now uses:
- `OpSQLiteAdapter` for database storage (using `@op-engineering/op-sqlite`)
- `MMKVStoreAdapter` for key-value storage (using `react-native-mmkv`)
These are now the default storage adapters in the `JazzProvider` for framework-less React Native applications.
## Example Provider Setup
<CodeGroup>
```tsx
// @noErrors: 2307 2686 2664
// App.tsx
import { JazzProvider } from "jazz-react-native";
import { MyAppAccount } from "./schema";
export function MyJazzProvider({ children }: { children: React.ReactNode }) {
  return (
    <JazzProvider
      sync={{ peer: "wss://cloud.jazz.tools/?key=you@example.com" }}
      AccountSchema={MyAppAccount}
    >
      {children}
    </JazzProvider>
  );
}
// Register the Account schema
declare module "jazz-react-native" {
  interface Register {
    Account: MyAppAccount;
  }
}
```
</CodeGroup>

## New Architecture Support

The `jazz-react-native` implementation fully supports [the React Native New Architecture](https://reactnative.dev/docs/the-new-architecture/landing-page). This includes compatibility with:

- JavaScript Interface (JSI) for more efficient JavaScript-to-native communication
- Fabric rendering system for improved UI performance
- TurboModules for better native module management
- Codegen for type-safe interfaces

No additional configuration is needed to use Jazz with the New Architecture.

## Potential Podfile Issues

If you encounter pod installation issues in a pnpm workspace environment (such as `undefined method '[]' for nil` in the Podfile at the line `config = use_native_modules!`), replace the problematic line with a manual path reference:
<CodeGroup>
```ts
react_native_path = "../node_modules/react-native"
config = { :reactNativePath => react_native_path }
```
</CodeGroup>
This approach bypasses issues with dependency resolution in workspace setups where packages may be hoisted to the root `node_modules`.
## For More Information
For detailed setup instructions, refer to the [React Native Setup Guide](/docs/react-native/project-setup)
